home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: newsfeed.pitt.edu!dsinc!scala!darren
- From: darren@scala.scala.com ("Darren M. Greenwald")
- Subject: Re: doubling pixels horizontally
- Message-ID: <1996Feb28.090905.19028@scala.scala.com>
- Date: Wed, 28 Feb 1996 09:09:05 GMT
- References: <2824.6626T859T1819@ifi.uio.no> <2637.6627T383T87@login.eunet.no> <719.6629T1277T1909@ifi.uio.no>
- Organization: US Research and Development - Scala Inc.
-
- In article <719.6629T1277T1909@ifi.uio.no> ludvigp@ifi.uio.no (Ludvig Pedersen) writes:
- >>Well, why do that peace of code get executed then, and not the other one?
- >>Ahh... now i know. Its the damn wait loop that locks the task, so the task
- >>gets bussy in the wait loop, and never gets to the cleanup routine.
- >>I stil think its a bug in QBlit. It should be called from from the blit
- >>interrupt. Waiting with a test loop insnt that OS friendly though.
- >>There is a solution though, with out signaling the task, but who wants to
- >>do that anyway.
- >
- >Yes, instead of using Signal()/Wait() one can also have an extra dummy
- >blitterpass which sets the flag instead of the CleanUp routine.
- >
- >But I agree it is a small bug.
- >
-
- You have to be really careful with busy loops. There is a very
- real possibility that at the time you QBlit, the blitter is being
- held by some other lower priority task (for blits started with
- Own/DisBlitter). If that happens, and you lock out the other
- task, and the other task does not ever get around to releasing
- the blitter, the queued blit won't be started, and you will sit
- there waiting forever.
-
- It is unlikely he is being affected by this, but the info may help.
- There is a hardwware bug that can cause the blitter to lock up, but
- it was only ever seen in some of the programmable video modes.
- It is possible that it exists in other video modes, but again,
- it was never seen. There is a fine song and dance played
- between blitter interrupt servicing, and vertical blank servicing
- to avoid this bug, but I could well imagine the bug being made
- to surface by long disables, or by adding a vertical blank server
- ahead of graphics. My recollection is that vertical blank handling
- was not rewritten in all of the ways it would need to be to entirely
- avoid this bug (this would have required a significant rewrite, and
- the bug was not found until near the very end of the AA software
- project). The bug has to do with when some of the programmable
- registers are written to, and there are a few timing slots during
- which writing some of these registers can cause the DMA slot
- allocation to slip it's normal priority scheme. The result being
- that chip register addresses inside the chip collide, and a common
- collision case results in the blitter state machine to lock up. The
- other reason that this was not entirely fixed for KS 3 is that
- when this was found, there where a few common cases that could
- be produced regularly, and observed with dualing analyzers (one
- for the CPU, one for the RGA bus). It would have required much
- more time for the hardware engineers to determine absolutely that
- all possible cases where understood. Delaying the product for
- that much longer was unrealistic, so instead, a reasonable work
- around was introduced in to software (with the caveats above), and
- stress tests where run for a couple of weeks running combinations
- of queued blits, own/disown blits, sprites, in various video modes
- that where known to show the problem.
-
- Still, I could not tell you with absolute 100% certainty that every
- possible case was found, or worked around. I can tell you that using
- the system in the perscribed ways was stress tested thoroughly, but
- it is definitely possible to abuse the system in ways that would
- exhasberate the bug. Really the a full solution would require
- the hardware engineers to prove that all possible cases are understood,
- and further to rewrite various portions of the vertical blanking routines,
- and likely some pieces in graphics to utterly and entirely check for
- and avoid writing to dangerous registers at the wrong time. That, or
- fix it in hardware (a software fix is probably sufficient though).
-
-
-
- --
- -----------------------------------------------------------
- Darren M. Greenwald | Scala Inc. R&D /
- Senior Systems Engineer | darren@scala.com o
- -----------------------------------------------------------
-